1. Field of the Invention
The present invention relates to software modelling, and deals more particularly with a method and apparatus for displaying components of a model which may have complex, semantically-typed relationships, using a program such as a browser. The components are presented in such a way as to make the relationships among them explicitly visible, allowing a user to navigate, edit, and populate the model in an efficient, intuitive manner by using these explicit relationships.
2. Description of the Related Art
Modern computer programs typically present information to people using those programs through a graphical user interface (“GUI”). In a GUI, information is depicted using graphical elements such as icons, menus, etc., as well as text. A user interacts with these graphical elements using the keyboard or some type of pointing or selecting device, such as a mouse or light pen.
A software application is, in essence, a model—that is, a computer-based representation of some real (or virtual) problem domain. In this computer-based representation, the salient aspects of the application domain are commonly represented as objects and relationships between the objects. Further, the software programs represent transforms on the object model. That is, the software program may manipulate the objects and/or relationships in an application-dependent way. This representation is referred to as an “object model”. Object models are well known in the art. In many cases, this modelling is formalized by the explicit building of a model of the model, known as a “metamodel”.
A metamodel defines the element types (both entity objects and relationship objects) that are available with which to build a model. The elements used to define a metamodel may themselves be defined using a “meta-metamodel”. It is possible to choose a “reflective” set of element types, such that the same fundamental element types may be used to define both a metamodel and a meta-metamodel. A reflective metamodel makes it possible to use the same tool set to work on meta-metamodels, metamodels, and models—an instance at one level of abstraction being a type for the next level. For example, the relationship links in a model are instances of the relationship types of the metamodel, which are themselves instances of the relationship types of the meta-metamodel.
When a user is developing application programs, a common development approach is to use some type of interactive development environment (“IDE”) that has a GUI. An IDE typically includes facilities for displaying and editing source code, compiling and debugging programs, etc. An example of an IDE with a GUI is VisualAge for Smalltalk, from the International Business Machines Corporation (“IBM”). (VisualAge is a registered trademark of IBM.) In the case of an IDE, part of the object model represents the software components themselves.
In an interactive development environment, information is commonly presented to the developer using a browser. A browser in this context is a type of window-based program adapted to viewing and editing information, and typically offers specific options to edit the model—that is, create, delete, or link instances of elements. A browser is typically divided into a number of different regions that are used for specific types of information. Commonly, the browser will have upper and lower horizontal regions, and the upper region will be further divided vertically. These vertical regions will be referred to herein as “panes”. Due to the limited amount of space available on the display screen, and the need to display data elements that are sufficiently descriptive so as to be understandable to the user, the number of panes is typically limited to three or four.
When a browser is used in object-oriented development, such as when using the Smalltalk or Java programming languages, the leftmost pane of the upper region is conventionally used for displaying information at a highest level of the hierarchy in the object model. (Java is a trademark of Sun Microsystems, Inc.) The object model in an object-oriented programming environment typically has objects of types referred to as packages (or applications), classes, and methods. These objects are linked by relationships of several different types, notably containment, inheritance, reference, and dependency. For example, methods are contained within classes, which are contained within packages (or applications). Classes and methods may inherit from other classes and methods. Applications, classes, or methods may depend on other applications, classes, or methods. Classes and methods may reference other classes and methods. These concepts are well known to one of ordinary skill in the art. A developer working with an object model may wish to view related objects in a number of different ways, for different purposes, using different views over the same objects. A view is a display of related model elements from a given perspective, that satisfies a user's query. For example, for a given class, the developer may wish to view all methods contained within that class. Or, he may wish to view all classes and methods which inherit from that class. In existing browsers, this information is presented in a hierarchical format.
To view hierarchies in GUIs, browsers with a number of panes are typically used. Each logical connection between panes represents a relationship. For example, a relationship of some type exists between elements displayed in a first pane, and the elements displayed in a second pane. Once an element representing an object (or objects) from a highest level of the hierarchy has been displayed in the leftmost pane of the browser, the developer is able to select one of the displayed elements. In an object-oriented development environment, the information that is typically displayed in the leftmost pane is a list of classes from the highest level of the model; or, a list of categories may be displayed, where the highest-level classes have been grouped into categories for ease of reference. Once the user selects an element from the list presented, the next pane to the immediate right is updated. The elements of the list in this updated pane depend on what was displayed in the pane from which the user made his selection: if the user selected from a list of classes, then the updated pane contains the subclasses and/or methods of the selected class; if the user selected from a list of class categories, then the updated pane contains a list of the classes defined as being in that category. The user can then make a subsequent selection from the list in this pane. In response to this selection, another pane (again displayed to the immediate right) is updated. The elements of the list in this pane again depend on the user's selection, and the type of elements defined as being available through the relationship(s) of the view the browser provides. Thus, with each selection made by the user from a subsequent pane, he is forming a trail through the hierarchy, thereby navigating the underlying hierarchy of the object model. A user unfamiliar with the model will typically infer the structure of the underlying object model from the structure of the browsers and the available navigations they offer.
While this navigation technique and the browser that facilitates it are well adapted to a simple object model that has relatively few types of elements, many applications have models that are more complex, and which do not fit well into a representation based on a single hierarchy or a few simple hierarchies. Existing browsers typically represent a hardwired, predetermined selection of particular relationships that constitute a view. This makes it difficult to add new views, because there may be no way to display those views in the browser. Further, a combinatorial explosion results from trying to enumerate the views that are possible over a given model with its multiple object types and multiple relationship types. This makes it impractical to build browsers for each view, or even to know which views would be useful to build. For models that are extensible by the user, a special browser is needed in order for the user to see the extensions he has made, and to perform useful editing operations on the model elements. Further, when an object model is complex, there may be many different useful ways of navigating the relationships, and this proliferation of navigation paths may make it difficult to understand the underlying metamodel of the model that is being navigated. Even a simple hierarchical nesting of elements within a pane—as is used by file managers such as Windows Explorer from Microsoft Corporation, for example—requires the user to already understand the available relationships (simple containment of files and directories within other directories, in the case of a file manager) as they are being navigated.
Accordingly, a need exists for a way to display these complex models, such that the user can conveniently and intuitively understand the relationships defined between one component and another. Further, a need exists for allowing the developer to navigate, edit, and populate these complex models using the relationships. The developer can then develop applications for the model, and/or data for applications based on the model. The proposed technique provides an explicit visual representation of the relationships for a selected component, where the relationships are represented as model elements. Filters may be defined for the available relationships, where a filter limits the browser view to a useful subset of the available relationships. The semantic typing of the relationships is used to provide the user with a meaningful and useful choice of actions to populate, edit, and navigate the model. Preferably, the present invention will be used to enhance the functionality and usability of a conventional hierarchically-oriented browser. Alternatively, a browser may be specifically designed to take advantage of the inventive concepts of the present invention.